package com.share.system.api;

import com.share.common.core.constant.ServiceNameConstants;
import com.share.system.api.domain.Region;
import com.share.system.api.domain.Station;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(contextId = "deviceApi",name = "share-device")
public interface DeviceApi {

    String API_PREFIX = "/api/device";

    @PostMapping(API_PREFIX + "/getDeviceCount")
    int getDeviceCount();

    @GetMapping(API_PREFIX + "/getDeviceRegionListByPageAndWapper")
    List<Region> getDeviceRegionListByPageAndWapper(
            @RequestParam("page") int page,
            @RequestParam("size") int size);

    @PostMapping(API_PREFIX + "/getStationCount")
    int getStationCount();

    @GetMapping(API_PREFIX + "/getStationCountListByPageAndWapper")
    List<Station> getStationCountListByPageAndWapper(
            @RequestParam("page") int page,
            @RequestParam("size") int size);

}
